package org.csu.domitory.service;

import org.csu.domitory.domain.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.csu.domitory.persistence.AccountMapper;

@Service
public class AccountService {
    @Autowired
    private AccountMapper accountMapper;
    public Account getAccount(String userId){
        return accountMapper.getAccount(userId);
    }
    public Account getAccountByUsernameAndPassword(String userId,String password){
        return accountMapper.getAccountByUsernameAndPassword(userId, password);
    }
    public void insertStud(String userId,String password){
        accountMapper.insertStudLogin(userId, password);
        accountMapper.insertStuProfile(userId);
    }

}
